<template>
  <div class="flex-container">
    <div class="flex-container-header" v-if="$slots.header">
      <slot name="header"></slot>
    </div>
    <div class="flex-container-body">
      <slot></slot>
    </div>
    <div class="flex-container-footer" v-if="$slots.footer">
      <slot name="footer"></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: "FlexContainer",
  props: {
    size: {
      type: String,
      default: "0px"
    },
    footer: {
      type: Boolean,
      default: false
    }
  }
};
</script>

<style lang="scss" scoped>
.flex-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  gap: v-bind(size);

  .flex-container-body {
    height: 0;
    flex: 1;
  }

  & > div {
    border: 1px solid transparent;
  }

  .flex-container-footer {
    :deep(.pagination-container) {
      padding: 0 !important;
    }
  }
}
</style>
